import request from '@/utils/request'

// 查询系统参数
export function getParam(configKey) {
  return request({
    url: '/common/config/' + configKey,
    method: 'get',
    headers: {
      isToken: false,
    },
  })
}

// 查询枚举数据
export function getStaticData(code, query) {
  return request({
    url: `/common/static/${code}`,
    method: 'get',
    params: query,
    headers: {
      isToken: false,
    },
  })
}

// 查询字典数据
export function getDictData(dictType) {
  return request({
    url: '/common/dict/' + dictType,
    method: 'get',
    headers: {
      isToken: false,
    },
  })
}


// 查询字典数据
export function getCategoryOptions(baseCode) {
  return request({
    url: '/common/category/' + baseCode,
    method: 'get',
    headers: {
      isToken: false,
    },
  })
}


export function getQRCode(query) {
  return request({
    url: '/common/qrCode',
    method: 'get',
    params: query,
    responseType: 'blob',
    headers: {
      isToken: false,
    },
  })
}
